<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>云茗茶城-购物车</title>
<%@include file="common/header.jsp" %>


	<link rel="stylesheet" href="css/login.css" />
	<link rel="stylesheet" href="css/index.css">
	<link href="css/myCart.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="js/myCart.js"></script>
</head>
<body>
<!-- 进入购物车页面进行用户判断 -->
<c:if test="${empty User }">
	<script>alert("你还未登录，请登录！")</script>
	<c:redirect url="login1.jsp" />
</c:if>
<c:if test="${empty cartlist }">
<c:redirect url="CartServlet?opt=sel" />
</c:if>

 <div class="top">
        <div class="top_con clearfix">
            <div class="logo fl"></div>
            <div class="nav fl">
                <div class="nav-im fl"></div>
                <ul class="fl .t_d">
                    <li><a href="index.jsp">茶坊首页</a></li>
                    <li><a href="culture.jsp">品德文化</a></li>
                    <li><a href="showtealists.jsp">茶品展示</a></li>
                    <li><a href="newsCentre.jsp">新闻中心</a></li>
                    <li><a href="#">营销服务</a></li>
                    <li><a href="#">招商联盟</a></li>
                    <li><a href="contactus.jsp">联系我们</a></li>
                    <li><a href="TeaServlet?opt=sel">茶具商店</a></li>
                </ul>
            </div>
            <div class="login fr">
                <c:if test="${ !empty (User)}">
                	<p class="p2">欢迎${User.passname }!</p>
                </c:if>
                <c:if test="${empty User }">
                <a href="myinfo.jsp"><img src="images/login.png" alt=""/></a>
                <p class="p1" ><a id="Login_start_" href="<%=request.getContextPath()%>/login1.jsp">登录</a>·<a id="Regist_start_" href="<%=request.getContextPath()%>/login2.jsp" >注册</a></p>
                <p class="p2">中/En</p>
                </c:if>
            </div>
        </div>
        <div class="search_box">
            <p class="sar_tit">生态茶园</p>
            <p class="sar_c">专业化生产高品质茶叶产品</p>
            <p class="sar_c2">Specialized production high-quality tea products</p>
            <input type="text" placeholder="想找点什么？">
            <p class="hot_tea">热门茶品:<a href="#">普洱生茶</a><a href="#">普洱熟茶</a><a href="#">西湖龙锦</a><a href="#">大红袍</a><a href="#">茉莉花茶</a><a href="#">高山乌龙</a></p>
            <ul class="page">
                <li></li>
                <li></li>
                <li></li>
                <li></li>
            </ul>
            <a href="#"><div class="search_btn btn1"></div></a>
            <a href="#"> <div class="search_btn btn2"></div></a>
        </div>
    </div>
    <!-- header结束 -->
    
    <!--
    	作者：offline
    	时间：2018-10-15
    	描述：会员登录开始
    -->
<!-- 购物车主题开始 -->
<div id="nav">您的位置：<a href="#">首页</a> &gt; <a href="#">我的订单</a> &gt; 我的购物车</div>
<div id="navlist">
    <ul>
        <li class="navlist_red_left"></li>
        <li class="navlist_red">1. 查看购物车</li>
        <li class="navlist_red_arrow"></li>
        <li class="navlist_gray">2. 确认订单信息</li>
        <li class="navlist_gray_arrow"></li>
        <li class="navlist_gray">3. 付款到云茗</li>
        <li class="navlist_gray_arrow"></li>
        <li class="navlist_gray">4. 确认收货</li>
        <li class="navlist_gray_arrow"></li>
        <li class="navlist_gray">5. 评价</li>
        <li class="navlist_gray_right"></li>
    </ul>
</div>

<div id="content">
	<form action="" method="post" name="myform">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="shopping">        
            <tr>
                <td class="title_1"><input id="allCheckBox" type="checkbox" value=""/>全选</td>
                <td class="title_2" colspan="2">云茗茶品</td>
                <td class="title_3">精品茶型</td>
                <td class="title_4">单价（元）</td>
                <td class="title_5">数量</td>
                <td class="title_6">小计（元）</td>
                <td class="title_7">操作</td>
            </tr>
            <tr>
                <td colspan="8" class="line"></td>
            </tr>
          <c:forEach var="cartmap" items="${cartlist }">
         
            <tr id="product1">
                <td class="cart_td_1"><input name="cartCheckBox" type="checkbox" value="product1"/></td>
                <td class="cart_td_2" ><img height="50px" width="50px" src="${cartmap.teapic1 }" alt="shopping"/></td>
                <td class="cart_td_3"><a href="#">
              ${cartmap.teaname } </a><br />
                    规格：${cartmap.teaspec }<br />
                    保障：<img src="images/mycart/taobao_icon_01.jpg" alt="icon" /></td>
                <td class="cart_td_4">${cartmap.teacount}</td>
                <td class="cart_td_5">${cartmap.teaprice}</td>
                <td class="cart_td_6"><img src="images/mycart/taobao_minus.jpg" alt="minus" class="hand"/> <input id="num_1" type="text"  value="${cartmap.count}" class="num_input" readonly="readonly"/> <img src="images/mycart/taobao_adding.jpg" alt="add" class="hand"/></td>
                <td class="cart_td_7"></td>
                <td class="cart_td_8"><a href="CartServlet?opt=del&cartid=${cart.id }">删除</a></td>
            </tr>

           </c:forEach>
          
            <tr>
                <td  colspan="3"><a id="deleteAll" href="javascript:void(0);"><img src="images/mycart/taobao_del.jpg" alt="delete"/></a></td>
                <td colspan="5" class="shopend">商品总价（不含运费）：<label id="total" class="yellow"></label> 元<br />
                    可获积分 <label class="yellow" id="integral"></label> 点<br />
                    <input name=" " type="image" src="images/mycart/taobao_subtn.jpg" /></td>
            </tr>        
    	</table>
    </form>

</div>

<!-- 购物车结束 -->
<%@include file="common/footer.jsp"%>
</body>
</html>